<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');
Class Seo extends CI_Controller {
    public function __construct() {
        parent::__construct();
          // load model
        $this->load->model('Classifiedscatg_model','',TRUE);
        $this->load->model('Classified_model','',TRUE);
        $this->load->model('Property_model','',TRUE);
        $this->load->model('Propertycatg_model','',TRUE);
        $this->load->model('Autotype_model','',TRUE);
        $this->load->model('Automobile_model','',TRUE);
        $this->load->model('Autobrand_model','',TRUE);  
        $this->load->model('Commercial_model','',TRUE); 
        $this->output->enable_profiler(FALSE);
        
        
    }

    function index(){
        $info = array();
    	//automobile brands
        $autoBrands = $this->Autobrand_model->get_autos_cag_total();
        $info['autoBrands'] = $autoBrands['rows'];
        //property types
        $propTypes = $this->Propertycatg_model->get_property_type_total();
        $info['propTypes'] = $propTypes['rows'];
        //buy/sell classifieds types
        $advTypes = $this->Classifiedscatg_model->get_cls_type_total();
        $info['advTypes'] = $advTypes['rows'];
    	$this->load->view("pages/sitemap",$info);
    }

    function sitemap()
    {
    	$data['data'] = array();
        $data['data'][] = "/home/test/";//select urls from DB to Array
        $data['data'][] = "/home/test1";//select urls from DB to Array
        header("Content-Type: text/xml;charset=iso-8859-1");
        $this->load->view("pages/url",$data);
    }
}
?>
